/**
 * 创元汇 - WebName
 * https://menger.me
 * @大梦
 */

import React, {Component} from 'react'
import {
    Text,
    View,
    Image,
    TextInput,
    ScrollView,
    StyleSheet,
    TouchableOpacity,
    StatusBar,
    WebView,
    Platform
} from 'react-native'
import { StackActions, NavigationActions } from 'react-navigation';
import NetRequest from '../../utils/utilsRequest'
import { KeyboardAwareScrollView } from 'react-native-keyboard-aware-scroll-view'
import ServicesApi from '../../constants/ServicesApi'
import GlobalStyles from '../../constants/GlobalStyles'
import NavigationBar from '../../components/common/NavigationBar'
import UtilsView from '../../utils/utilsView'
import { toastShort, toastLong, consoleLog } from '../../utils/utilsToast'
import AlertManager from '../../components/common/AlertManager'
import {Overlay, Label, Button} from 'teaset';
export default class RenzhengchengnuoLogin extends Component {

    constructor(props) {
        super(props);
        this.state =  {
            asset_scale1: 2,
            asset_scale2: 2,
            investment_experience: 2,
            control: 2,
            control_remark: '',
            beneficiary: 2,
            beneficiary_remark: '',
            bad_record: 2,
            bad_record_remark: '',
            isTongyi: 2
        }
        // this.netRequest = new NetRequest();
    }

    componentDidMount(){
        this.loadNetData();
    }

    onBack = () => {
        this.props.navigation.goBack();
    }

    updateState= (state) => {
        if (!this) { return };
        this.setState(state);
    }

    loadNetData = () => {
        
    }

    Subziliao = () => {
        let url = ServicesApi.insert_investor_promise;
        let asset_scale1 = this.state.asset_scale1,
            asset_scale2 = this.state.asset_scale2,
            investment_experience = this.state.investment_experience,
            control = this.state.control,
            control_remark = this.state.control_remark,
            beneficiary = this.state.beneficiary,
            beneficiary_remark = this.state.beneficiary_remark,
            bad_record = this.state.bad_record,
            bad_record_remark = this.state.bad_record_remark;

        
        if(asset_scale1 == 2 || asset_scale2 == 2 || investment_experience == 2 || control == 2 || beneficiary == 2 || bad_record == 2){
            toastShort('资料未填写完整，系统无法签署');
            return false;
        }else if(investment_experience == 0){
            toastShort('投资经历不符合条件，系统无法签署');
            // const params = {
            //     title: '温馨提示',
            //     detail: '无法签署本承诺书，点击“继续”返回填写，点击“退出”返回主页。',
            //     actions: [
            //         { title: '退出', titleStyle: {  }, actionStyle: {  }, onPress: () => { 
            //             this.onPushHome();
            //         } },
            //         { title: '继续', onPress: () => { 
                        
            //         } }
            //     ]
            // }
            // AlertManager.show(params)
            return false
        }else if(control == 1){
            toastShort('存在实际控制关系，系统无法签署，请联系您的财富顾问');
            return false
        }else if(beneficiary == 1){
            toastShort('交易的实际受益人是他人，系统无法签署，请联系您的财富顾问');
            return false
        }else if(bad_record == 1){
            toastShort('有不良诚信记录，系统无法签署');
            return false
        }

        if(this.state.isTongyi == 1) {
            let data = {
                asset_scale1: asset_scale1,
                asset_scale2: asset_scale2,
                investment_experience: investment_experience,
                control: control,
                control_remark: control_remark,
                beneficiary: beneficiary,
                beneficiary_remark: beneficiary_remark,
                bad_record: bad_record,
                bad_record_remark: bad_record_remark,
                member_id: global.user.userData.id,
                token: global.user.userData.token
            }

            Services.post(url, data, true)
                .then( result => {
                    console.log(result);
                    if (result && result.code == StatusCode.SUCCESS_CODE) {
                        this.pingguAgree(result.data.url, result.data.show_url);
                    }else{
                        toastLong(result.msg);
                    }
                })
                .catch( error => {
                    // toastShort('服务器请求失败，请稍后重试！');
                })
        }else {
            toastShort('请勾选以上的资金合法声明');
        }
        

            
    }

    pingguAgree = (shuju, show_link) => {
        let overlayView = (
            <Overlay.PullView side='bottom' modal={false} ref={v => this.overlayView = v}>
                <View style={{backgroundColor: '#fff', width: GlobalStyles.width, height: GlobalStyles.height}}>
                    <WebView
                        startInLoadingState={true}
                        source={{uri: show_link}}
                        style={styles.webContainer}
                    />
                    
                    <View style={styles.botBar}>
                        <TouchableOpacity onPress={()=>{this.overlayView && this.overlayView.close()}} style={styles.botLeft}>
                            <Text style={[styles.botLeftText, {fontSize: 15}]}>取消</Text>
                        </TouchableOpacity>
                        <TouchableOpacity onPress={()=>{this.submit002(shuju);}} style={styles.botRight}>
                            <Text style={styles.botRightText}>同意签署</Text>
                        </TouchableOpacity> 
                    </View>
                </View>
            </Overlay.PullView>
        );
        Overlay.show(overlayView);
    }

    submit002 = (shuju) => {
        let url = ServicesApi.create_pdf;
        let data = {
            url: shuju,
            style: '002',
            id: '',
            member_id: global.user.userData.id,
            token: global.user.userData.token,
        }
        AlertManager.showPopView(<View style={[GlobalStyles.loadingview, GlobalStyles.flexColumnCenter]}><Image source={require('../../assets/images/icons/loading.gif')} style={GlobalStyles.loading} /><Text style={GlobalStyles.loadingtext}>文件生成中，请稍候...</Text></View>, { modal:true })
        Services.post(url, data, true)
            .then( result => {
                console.log(result);
                AlertManager.hide();
                if (result && result.code == StatusCode.SUCCESS_CODE) {
                    const params = {
                        title: '温馨提示',
                        detail: '尊敬的会员，您已成功签署本承诺书，请点击“继续”，进行签署《投资者风险匹配告知书及投资者确认函》。',
                        actions: [
                            { title: '取消', titleStyle: {  }, actionStyle: {  }, onPress: () => { 
                                this.overlayView && this.overlayView.close()
                            } },
                            { title: '继续', onPress: () => { 
                                this.overlayView && this.overlayView.close()
                                this.pingguAgree1(result.data.url+global.user.userData.id, result.data.show_url+global.user.userData.id);
                            } }
                        ]
                    }
                    AlertManager.show(params)
                    
                }else{
                    toastLong(result.msg);
                }
            })
            .catch( error => {
                // toastShort('服务器请求失败，请稍后重试！');
            })
    }

    pingguAgree1 = (shuju, show_link) => {
        let overlayView1 = (
            <Overlay.PullView side='bottom' modal={false} ref={v => this.overlayView1 = v}>
                <View style={{backgroundColor: '#fff', width: GlobalStyles.width, height: GlobalStyles.height}}>
                    <WebView
                        startInLoadingState={true}
                        source={{uri: show_link}}
                        style={styles.webContainer}
                    />
                    
                    <View style={styles.botBar}>
                        <TouchableOpacity onPress={()=>{this.overlayView1 && this.overlayView1.close()}} style={styles.botLeft}>
                            <Text style={[styles.botLeftText, {fontSize: 15}]}>取消</Text>
                        </TouchableOpacity>
                        <TouchableOpacity onPress={()=>{this.submit003(shuju);}} style={styles.botRight}>
                            <Text style={styles.botRightText}>同意签署</Text>
                        </TouchableOpacity> 
                    </View>
                </View>
            </Overlay.PullView>
        );
        Overlay.show(overlayView1);
    }

    submit003 = (shuju) => {
        let url = ServicesApi.create_pdf;
        let data = {
            url: shuju,
            style: '003',
            id: '',
            member_id: global.user.userData.id,
            token: global.user.userData.token,
        }
        AlertManager.showPopView(<View style={[GlobalStyles.loadingview, GlobalStyles.flexColumnCenter]}><Image source={require('../../assets/images/icons/loading.gif')} style={GlobalStyles.loading} /><Text style={GlobalStyles.loadingtext}>文件生成中，请稍候...</Text></View>, { modal:true })
        Services.post(url, data, true)
        .then( result => {
            console.log(result);
            AlertManager.hide();
            if (result && result.code == StatusCode.SUCCESS_CODE) {
                if(global.user.userData.is_investor == 0 || global.user.userData.is_investor == -2){
                    const params = {
                        title: '温馨提示',
                        detail: '尊敬的会员，您已成功签署本承诺书，并恭喜完成特定对象认定，点击“继续”，进入专业投资者认定（阅读风险揭示书），点击“返回”，返回基金频道查看基金产品信息。',
                        actions: [
                            { title: '返回', titleStyle: {  }, actionStyle: {  }, onPress: () => { 
                                this.overlayView1 && this.overlayView1.close()
                                setTimeout(() => {
                                    const resetAction = NavigationActions.reset({
                                        index: 0,
                                        actions: [
                                            NavigationActions.navigate({ routeName: 'TabNavScreen'})
                                        ]
                                    })
                                    this.props.navigation.dispatch(resetAction)
                                }, 101)
                                // this.onPushNavigator('Fund');
                            } },
                            { title: '继续', onPress: () => { 
                                this.overlayView1 && this.overlayView1.close()
                                this.onPushNavigator('RenzhengTypeLogin');
                            } }
                        ]
                    }
                    AlertManager.show(params)
                }else {
                    this.overlayView && this.overlayView.close()
                }
            }else{
                toastLong(result.msg);
            }
        })
        .catch( error => {
            // toastShort('服务器请求失败，请稍后重试！');
        })
    }

    onPushNavigator = (compent) => {
        const { navigate } = this.props.navigation;
        navigate( compent , {
            
        })
    }

    onPushHome = () => {
        setTimeout(() => {
            const resetAction = NavigationActions.reset({
                index: 0,
                actions: [
                    NavigationActions.navigate({ routeName: 'TabNavScreen'})
                ]
            })
            this.props.navigation.dispatch(resetAction)
        }, 500)
    }

    setTongyi = (num) => {
        this.updateState({
            isTongyi: num
        })
    }

    // //在选择1的 是 时，判断2的 是 有没有选择
    // checkyes2 = () => {
    //     if(this.state.asset_scale2 == 1){
    //         toastShort('1和2满足一个即可')
    //     }else{
    //         this.updateState({asset_scale1: 1});
    //     }
    // }
    
    // checkyes1 = () => {
    //     if(this.state.asset_scale1 == 1){
    //         toastShort('1和2满足一个即可')
    //     }else{
    //         this.updateState({asset_scale2: 1});
    //     }
    // }

    // //在选择1的 否 时，判断2的 否 有没有选择
    // checkno2 = () => {
    //     if(this.state.asset_scale2 == 0){
    //         toastShort('1和2需满足一个')
    //     }else{
    //         this.updateState({asset_scale1: 0});
    //     }
    // }
    
    // checkno1 = () => {
    //     if(this.state.asset_scale1 == 0){
    //         toastShort('1和2需满足一个')
    //     }else{
    //         this.updateState({asset_scale2: 0});
    //     }
    // }

    render(){
        let navigationBar = {
            backgroundColor: '#fff',
            borderBottomColor: '#f2f2f2',
            borderBottomWidth: 1
        }
        return (
            <View style={styles.container}>
                <NavigationBar
                    title = {'符合合格投资者标准的承诺书'}
                    style = {navigationBar}
                    titleStyle = {{color: '#333333'}}
                    leftButton = {UtilsView.getLeftBlackButton(() => this.onBack())}
                    rightButton = {UtilsView.getRightTiaoguoBlackButton(() => this.onPushHome())}
                />
                <StatusBar
                    animated = {true}
                    hidden = {false}
                    backgroundColor = {'transparent'}
                    translucent = {true}
                    barStyle = {'dark-content'}
                />
                <KeyboardAwareScrollView keyboardShouldPersistTaps={'handled'}>
                    <View style={[GlobalStyles.whiteModule, {marginTop: 10}]}>
                        <View style={[GlobalStyles.titleModule,GlobalStyles.flexRowBetween]}>
                            <View style={[GlobalStyles.titleLeft, GlobalStyles.flexRowStart]}>
                                <Text style={GlobalStyles.titleText}>资产规模<Text style={{fontSize: 13, color: '#666', fontWeight: 'normal'}}>（1和2满足一个即可）</Text></Text>
                            </View>
                        </View>
                        <View style={[GlobalStyles.mradio]}>
                            <View style={[GlobalStyles.radioItem, GlobalStyles.flexColumnStart]}>
                                <Text style={[GlobalStyles.radioRight, {textAlign: 'justify'}]}>1.金融资产不低于人民币500万，或者最近三年均收入不低于人民币50万。</Text>
                            </View>
                            <View style={[styles.shifouWrap, GlobalStyles.flexRowBetween]}>
                            {this.state.asset_scale1 == 1 ?
                                <TouchableOpacity onPress={()=>{this.updateState({asset_scale1: 1, asset_scale2: 0})}} style={[styles.shifou, styles.shifouActive, {marginRight: 10}]}>
                                    <Text style={[styles.shifouText, styles.shifouTextActive]}>是</Text>
                                </TouchableOpacity>
                                :
                                <TouchableOpacity onPress={()=>{this.updateState({asset_scale1: 1, asset_scale2: 0})}} style={[styles.shifou, {marginRight: 10}]}>
                                    <Text style={[styles.shifouText]}>是</Text>
                                </TouchableOpacity>
                            }
                            {this.state.asset_scale1 == 0 ?
                                <TouchableOpacity onPress={()=>{this.updateState({asset_scale1: 0, asset_scale2: 1})}} style={[styles.shifou, styles.shifouActive,]}>
                                    <Text style={[styles.shifouText, styles.shifouTextActive]}>否</Text>
                                </TouchableOpacity>
                                :
                                <TouchableOpacity onPress={()=>{this.updateState({asset_scale1: 0, asset_scale2: 1})}} style={styles.shifou}>
                                    <Text style={styles.shifouText}>否</Text>
                                </TouchableOpacity>
                            }
                            </View>
                        </View>
                        <View style={[GlobalStyles.mradio]}>
                            <View style={[GlobalStyles.radioItem, GlobalStyles.flexColumnStart]}>
                                <Text style={[GlobalStyles.radioRight, {textAlign: 'justify'}]}>2.私募基金或资产管理计划投资者，最近20个交易日金融资产不得低于人民币300万元，或最近三年均收入不低于人民币50万。</Text>
                            </View>
                            <View style={[styles.shifouWrap, GlobalStyles.flexRowBetween]}>
                            {this.state.asset_scale2 == 1 ?
                                <TouchableOpacity onPress={()=>{this.updateState({asset_scale2: 1, asset_scale1: 0})}} style={[styles.shifou, styles.shifouActive, {marginRight: 10}]}>
                                    <Text style={[styles.shifouText, styles.shifouTextActive]}>是</Text>
                                </TouchableOpacity>
                                :
                                <TouchableOpacity onPress={()=>{this.updateState({asset_scale2: 1, asset_scale1: 0})}} style={[styles.shifou, {marginRight: 10}]}>
                                    <Text style={[styles.shifouText]}>是</Text>
                                </TouchableOpacity>
                            }
                                {this.state.asset_scale2 == 0 ?
                                <TouchableOpacity onPress={()=>{this.updateState({asset_scale2: 0, asset_scale1: 1})}} style={[styles.shifou, styles.shifouActive,]}>
                                    <Text style={[styles.shifouText, styles.shifouTextActive]}>否</Text>
                                </TouchableOpacity>
                                :
                                <TouchableOpacity onPress={()=>{this.updateState({asset_scale2: 0, asset_scale1: 1})}} style={styles.shifou}>
                                    <Text style={styles.shifouText}>否</Text>
                                </TouchableOpacity>
                            }
                            </View>
                        </View>
                    </View>
                    <View style={[GlobalStyles.whiteModule, {marginTop: 10}]}>
                        <View style={[GlobalStyles.titleModule,GlobalStyles.flexRowBetween]}>
                            <View style={[GlobalStyles.titleLeft, GlobalStyles.flexRowStart]}>
                                <Text style={GlobalStyles.titleText}>投资经历<Text style={{fontSize: 13, color: '#666', fontWeight: 'normal'}}>（如选择“否”，系统无法签署）</Text></Text>
                            </View>
                        </View>
                        <View style={[GlobalStyles.mradio]}>
                            <View style={[GlobalStyles.radioItem, GlobalStyles.flexColumnStart]}>
                                <Text style={[GlobalStyles.radioRight, {textAlign: 'justify'}]}>具有2年以上证券、基金、期货、黄金、外汇等投资经历，或者具有2年以上金融产品设计、投资、风险管理及相关工作经历，或者属于《证券期货投资者适当性管理办法》第八条第（一）项规定的专业投资者的高级管理人员、获得职业资格认证的从事金融相关业务的注册会计师和律师。</Text>
                            </View>
                            <View style={[styles.shifouWrap, GlobalStyles.flexRowBetween]}>
                             {this.state.investment_experience == 1 ?
                                <TouchableOpacity onPress={()=>{this.updateState({investment_experience: 2})}} style={[styles.shifou, styles.shifouActive, {marginRight: 10}]}>
                                    <Text style={[styles.shifouText, styles.shifouTextActive]}>是</Text>
                                </TouchableOpacity>
                                :
                                <TouchableOpacity onPress={()=>{this.updateState({investment_experience: 1})}} style={[styles.shifou, {marginRight: 10}]}>
                                    <Text style={[styles.shifouText]}>是</Text>
                                </TouchableOpacity>
                            }
                                 {this.state.investment_experience == 0 ?
                                <TouchableOpacity onPress={()=>{this.updateState({investment_experience: 2})}} style={[styles.shifou,  styles.shifouActive,]}>
                                    <Text style={[styles.shifouText, styles.shifouTextActive]}>否</Text>
                                </TouchableOpacity>
                                :
                                <TouchableOpacity onPress={()=>{this.updateState({investment_experience: 0})}} style={styles.shifou}>
                                    <Text style={styles.shifouText}>否</Text>
                                </TouchableOpacity>
                            }
                            </View>
                        </View>
                    </View>
                    <View style={[GlobalStyles.whiteModule, {marginTop: 10}]}>
                        <View style={[GlobalStyles.titleModule,GlobalStyles.flexRowBetween]}>
                            <View style={[GlobalStyles.titleLeft, GlobalStyles.flexRowStart]}>
                                <Text style={GlobalStyles.titleText}>特殊说明</Text>
                            </View>
                        </View>
                        <View style={[GlobalStyles.mradio, {width: GlobalStyles.width - 60}]}>
                            <View style={[GlobalStyles.radioItem, GlobalStyles.flexColumnStart]}>
                                <Text style={GlobalStyles.radioRight}>1.是否存在实际控制关系</Text>
                                <View style={[styles.shifouWrap, GlobalStyles.flexRowBetween, {marginTop: 10, marginBottom: 10}]}>
                                 {this.state.control == 0 ?
                                    <TouchableOpacity onPress={()=>{this.updateState({control: 2})}} style={[styles.shifou, styles.shifouActive, {marginRight: 10}]}>
                                        <Text style={[styles.shifouText, styles.shifouTextActive]}>否</Text>
                                    </TouchableOpacity>
                                    :
                                    <TouchableOpacity onPress={()=>{this.updateState({control: 0})}} style={[styles.shifou, {marginRight: 10}]}>
                                        <Text style={styles.shifouText}>否</Text>
                                    </TouchableOpacity>
                                }
                                {this.state.control == 1 ?
                                        <TouchableOpacity onPress={()=>{this.updateState({control: 2})}} style={[styles.shifou, styles.shifouActive]}>
                                            <Text style={[styles.shifouText, styles.shifouTextActive]}>是</Text>
                                        </TouchableOpacity>
                                        :
                                        <TouchableOpacity onPress={()=>{this.updateState({control: 1})}} style={[styles.shifou]}>
                                            <Text style={[styles.shifouText]}>是</Text>
                                        </TouchableOpacity>
                                }
                                     
                                </View>
                                <TextInput
                                    placeholder={'如存在，请说明'}
                                    onChangeText={(text) => {
                                        this.updateState({
                                            control_remark: text
                                        })
                                    }}
                                    style={[styles.spacialText, GlobalStyles.cellTextColor, GlobalStyles.isIOS ? null : styles.inputAndroid]} 
                                    underlineColorAndroid={'transparent'}
                                >
                                </TextInput>
                            </View>
                            <View style={[GlobalStyles.radioItem, GlobalStyles.flexColumnStart]}>
                                <Text style={GlobalStyles.radioRight}>2.交易的实际受益人</Text>
                                <View style={[styles.shifouWrap, GlobalStyles.flexRowBetween, {marginTop: 10, marginBottom: 10}]}>
                                 {this.state.beneficiary == 0 ?
                                    <TouchableOpacity onPress={()=>{this.updateState({beneficiary: 2})}} style={[styles.shifou, styles.shifouActive, {marginRight: 10}]}>
                                        <Text style={[styles.shifouText, styles.shifouTextActive]}>本人</Text>
                                    </TouchableOpacity>
                                    :
                                    <TouchableOpacity onPress={()=>{this.updateState({beneficiary: 0})}} style={[styles.shifou, {marginRight: 10}]}>
                                        <Text style={[styles.shifouText]}>本人</Text>
                                    </TouchableOpacity>
                            }
                                     {this.state.beneficiary == 1 ?
                                    <TouchableOpacity onPress={()=>{this.updateState({beneficiary: 2})}} style={[styles.shifou, styles.shifouActive,]}>
                                        <Text style={[styles.shifouText, styles.shifouTextActive]}>他人</Text>
                                    </TouchableOpacity>
                                    :
                                    <TouchableOpacity onPress={()=>{this.updateState({beneficiary: 1})}} style={styles.shifou}>
                                        <Text style={styles.shifouText}>他人</Text>
                                    </TouchableOpacity>
                            }
                                </View>
                                <TextInput
                                    placeholder={'如果是他人，请说明'}
                                    onChangeText={(text) => {
                                        this.updateState({
                                            beneficiary_remark: text
                                        })
                                    }}
                                    style={[styles.spacialText, GlobalStyles.cellTextColor, GlobalStyles.isIOS ? null : styles.inputAndroid]} 
                                    underlineColorAndroid={'transparent'}
                                >
                                </TextInput>
                            </View>
                            <View style={[GlobalStyles.radioItem, GlobalStyles.flexColumnStart]}>
                                <Text style={GlobalStyles.radioRight}>3.是否有不良诚信记录</Text>
                                <View style={[styles.shifouWrap, GlobalStyles.flexRowBetween, {marginTop: 10, marginBottom: 10}]}>
                                 {this.state.bad_record == 0 ?
                                    <TouchableOpacity onPress={()=>{this.updateState({bad_record: 2})}} style={[styles.shifou, styles.shifouActive, {marginRight: 10}]}>
                                        <Text style={[styles.shifouText, styles.shifouTextActive,]}>否</Text>
                                    </TouchableOpacity>
                                    :
                                    <TouchableOpacity onPress={()=>{this.updateState({bad_record: 0})}} style={[styles.shifou, {marginRight: 10}]}>
                                        <Text style={styles.shifouText}>否</Text>
                                    </TouchableOpacity>
                                }
                                {this.state.bad_record == 1 ?
                                    <TouchableOpacity onPress={()=>{this.updateState({bad_record: 2})}} style={[styles.shifou, styles.shifouActive]}>
                                        <Text style={[styles.shifouText, styles.shifouTextActive]}>是</Text>
                                    </TouchableOpacity>
                                    :
                                    <TouchableOpacity onPress={()=>{this.updateState({bad_record: 1})}} style={[styles.shifou]}>
                                        <Text style={[styles.shifouText]}>是</Text>
                                    </TouchableOpacity>
                                }
                                     
                                </View>
                                <TextInput
                                    placeholder={'如果有，请说明'}
                                    onChangeText={(text) => {
                                        this.updateState({
                                            bad_record_remark: text
                                        })
                                    }}
                                    style={[styles.spacialText, GlobalStyles.cellTextColor, GlobalStyles.isIOS ? null : styles.inputAndroid]} 
                                    underlineColorAndroid={'transparent'}
                                >
                                </TextInput>
                            </View>
                        </View> 
                    </View>
                    <View style={[GlobalStyles.whiteModule, {marginTop: 0}]}>
                    {(this.state.isTongyi != 0) && (this.state.isTongyi != 2) ?
                        <TouchableOpacity 
                            onPress={() => {this.setTongyi(0)}} 
                            style={[GlobalStyles.mradio, {width: GlobalStyles.width - 30, marginTop: 10, marginBottom: 0}]}
                        >
                            <View style={[GlobalStyles.radioItem, GlobalStyles.flexRowStartStart]}>
                                <View style={[GlobalStyles.checkboxLeft, {borderColor: GlobalStyles.themeColor, backgroundColor: GlobalStyles.themeColor}]}>
                                    <Image source={require('../../assets/images/icons/icon_gouxuan.png')} style={[GlobalStyles.gouxuanIco]} />
                                </View>
                                <Text style={GlobalStyles.radioRightThemeColor}>本人保证资金来源的合法性和所提供资料的真实性、有效性、准确性、完整性，并对其承担责任。</Text>
                            </View>
                        </TouchableOpacity>
                    :
                        <TouchableOpacity 
                            onPress={() => {this.setTongyi(1)}} 
                            style={[GlobalStyles.mradio, {width: GlobalStyles.width - 30, marginTop: 10, marginBottom: 0}]}
                        >
                            <View style={[GlobalStyles.radioItem, GlobalStyles.flexRowStartStart]}>
                                <View style={[GlobalStyles.checkboxLeft, {borderColor: '#666', }]}></View>
                                <Text style={GlobalStyles.radioRightThemeColor}>本人保证资金来源的合法性和所提供资料的真实性、有效性、准确性、完整性，并对其承担责任。</Text>
                            </View>
                        </TouchableOpacity>
                    }
                </View>
                    <TouchableOpacity onPress={()=>this.Subziliao()} style={[GlobalStyles.submit, {marginBottom: 15, marginTop: 15, backgroundColor: GlobalStyles.themeColor, height: 45}]}>
                        <View style={GlobalStyles.btn}>
                            <Text style={GlobalStyles.btna}>提交</Text>   
                        </View>
                    </TouchableOpacity>
                </KeyboardAwareScrollView>
            </View>
        );
    }
}

const styles = StyleSheet.create({
    container: {
        flex: 1,
        backgroundColor: '#fff',
    },
    shifouWrap: {
        width: GlobalStyles.width - 30
    },
    shifou: {
        // width: (GlobalStyles.width - 30)/2,
        height: 45,
        borderWidth: 1,
        borderColor: GlobalStyles.themeColor,
        display: 'flex',
        alignItems: 'center',
        justifyContent: 'center',
        flex: 1,
        // backgroundColor: '#f00'
    },
    shifouText: {
        textAlign: 'center',
        fontSize: 16,
        color: GlobalStyles.themeColor,
    },
    shifouActive: {
        backgroundColor: GlobalStyles.themeColor,
    },
    shifouTextActive: {
        color: '#fff',
        
    },
    spacialText: {
        height:45,
        fontSize:15,
        textAlign:'left',
        color:'#525252',
        borderBottomWidth:1,
        borderBottomColor:'#ececec',
    },
    webContainer: {
        width: GlobalStyles.width,
        height: GlobalStyles.height,
        flex: 1,
        backgroundColor: '#fff',
        marginTop: Platform.OS === 'ios' ? -15 : 0,
    },
    botBar: {
        height: 54,
        backgroundColor: '#fff',
        display: 'flex',
        flexDirection: 'row',
        justifyContent: 'center',
        alignItems: 'center',
        borderTopColor: '#ececec',
        borderTopWidth: 1,

    },
    botLeft: {
        height: 54,
        flex: 1,
        display: 'flex',
        flexDirection: 'column',
        justifyContent: 'center',
        alignItems: 'center'
    },
    botLeftIco: {
        height: 24,

    },
    botLeftText: {
        fontSize: 13,
        color: '#666',
        height: 20,
        lineHeight: 20,
    },
    botRight: {
        flex: 2.5,
        backgroundColor: GlobalStyles.themeColor,
        height: 54,
        justifyContent: 'center',
        alignItems: 'center',

    },
    botRightText: {
        color: '#fff',
        fontSize: 18,
        fontWeight: 'bold'
    },
});
